package com.example;

import com.example.kafka.KafkaProducer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class KafkaFlinkClickhouseDemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(KafkaFlinkClickhouseDemoApplication.class, args);

        // 测试 Kafka 生产者
        KafkaProducer producer = context.getBean(KafkaProducer.class);
        producer.sendMessage("Hello, Kafka!");
    }

}
